package de.fhhof.vinf.ssp.ticketcenter.helpers;

import java.io.PrintWriter;

/**
 * 
 * @author VirtualBox
 *
 */
public class ServletHelper {
	
	/**
	 * Schreibt den Inhalt der Homepage bis zu der Stelle, in der der Content eingebettet wird.
	 * @param out	PrintWriter des Servlets, in den die Ausgabe geschrieben wird.
	 */
	public static void printHeader(PrintWriter out, String cssPath){
		out.write("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">");
		out.write("<html xmlns=\"http://www.w3.org/1999/xhtml\">");
			out.write("<head>");
				out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />");
				out.write("<title>Studienarbeit SSP in Java</title>");
				out.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"" + cssPath + "\" />");
			out.write("</head>");
			out.write("<body>");
				out.write("<div id=\"wrapper\">");
					out.write("<div id=\"outheader\">");
						out.write("<div id=\"inheader\">");
							out.write("<h1>Header</h1>");
						out.write("</div>");
					out.write("</div>");				
	}
	
	/**
	 * Schreibt den Inhalt der Homepage nach der Stelle, an der das Loginpanel eingebettet wird.
	 * @param out	PrintWriter des Servlets, in den die Ausgabe geschrieben wird.
	 */
	public static void printFooter(PrintWriter out){
							out.write("<br/><br/><hr/>");
							out.write("<div id=\"inhalt\">");
								out.write("<h2>Inhalt</h2><br/>");
								out.write("<a href=\"/StudienarbeitNeu/Index\">Startseite</a><br/>");
								out.write("<a href=\"/StudienarbeitNeu/Index?site=register\">Registrierung</a><br/>");
								out.write("<a href=\".\">Platzhalter</a><br/>");
								out.write("<a href=\".\">Platzhalter</a><br/>");
							out.write("</div>");
						out.write("</div>");
					out.write("</div>");
					out.write("<div id=\"outimpressum\">");
						out.write("<div id=\"inimpressum\">Impressum</div>");
					out.write("</div>");
				out.write("</div>");
			out.write("</body>");
		out.write("</html>");
	}

}


